home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.36 / includespcq / view.i < prev    next >
Text File  |  1994-09-17  |  5KB  |  181 lines

  1. {
  2.     View.i for PCQ Pascal
  3. }
  4.  
  5.  
  6. {$I   "Include:Graphics/GFX.i"}
  7. {$I   "Include:Graphics/Copper.i"}
  8. {$I   "Include:Graphics/GFXNodes.i"}
  9. {$I   "Include:Graphics/Monitor.i"}
  10.  
  11. Type
  12.     RasInfo = record    { used by callers to and InitDspC() }
  13.         Next    : ^RasInfo;     { used for dualpf }
  14.         BitMap  : BitMapPtr;
  15.         RxOffset,
  16.         RyOffset : Short;       { scroll offsets in this BitMap }
  17.     end;
  18.     RasInfoPtr = ^RasInfo;
  19.  
  20.     View = record
  21.         v_ViewPort      : Address;      { ViewPortPtr }
  22.         LOFCprList      : cprlistptr;   { used for interlaced and noninterlaced }
  23.         SHFCprList      : cprlistptr;   { only used during interlace }
  24.         DyOffset,
  25.         DxOffset        : Short;        { for complete View positioning }
  26.                                 { offsets are +- adjustments to standard #s }
  27.         Modes           : Short;        { such as INTERLACE, GENLOC }
  28.     end;
  29.     ViewPtr = ^View;
  30.  
  31. { these structures are obtained via GfxNew }
  32. { and disposed by GfxFree }
  33. Type
  34.        ViewExtra = Record
  35.         n : ExtendedNode;
  36.         ve_View : View;       { backwards link }   { view in C-Includes }
  37.         Monitor : MonitorSpecPtr; { monitors for this view }
  38.        END;
  39.        ViewExtraPtr = ^ViewExtra;
  40.  
  41.  
  42.     ViewPort = record
  43.         Next    : ^ViewPort;
  44.         ColorMap : Address; { table of colors for this viewport }        { ColorMapPtr }
  45.                           { if this is nil, MakeVPort assumes default values }
  46.         DspIns  : CopListPtr;   { user by MakeView() }
  47.         SprIns  : CopListPtr;   { used by sprite stuff }
  48.         ClrIns  : CopListPtr;   { used by sprite stuff }
  49.         UCopIns : UCopListPtr;  { User copper list }
  50.         DWidth,
  51.         DHeight : Short;
  52.         DxOffset,
  53.         DyOffset : Short;
  54.         Modes   : Short;
  55.         SpritePriorities : Byte;        { used by makevp }
  56.         reserved : Byte;
  57.         RasInfo : RasInfoPtr;
  58.     end;
  59.     ViewPortPtr = ^ViewPort;
  60.  
  61.  
  62. { this structure is obtained via GfxNew }
  63. { and disposed by GfxFree }
  64.  ViewPortExtra = Record
  65.   n : ExtendedNode;
  66.   vpe_ViewPort : ViewPortPtr;      { backwards link }   { ViewPort in C-Includes }
  67.   DisplayClip  : Rectangle;  { makevp display clipping information }
  68.  END;
  69.  ViewPortExtraPtr = ^ViewPortExtra;
  70.  
  71.  
  72.     ColorMap = record
  73.         Flags   : Byte;
  74.         CType   : Byte;            { This is "Type" in C includes }
  75.         Count   : Short;
  76.         ColorTable      : Address;
  77.         cm_vpe  : ViewPortExtraPtr;
  78.         TransparencyBits : Address;
  79.         TransparencyPlane,
  80.         reserved1        : Byte;
  81.         reserved2        : Short;
  82.         cm_vp            : Address;    { ViewPortPtr }
  83.         NormalDisplayInfo,
  84.         CoerceDisplayInfo : Address;    { in C-Includes APTR }
  85.         cm_batch_items   : Address;
  86.         VPModeID         : Integer;
  87.     end;
  88.     ColorMapPtr = ^ColorMap;
  89.  
  90. { if Type == 0 then ColorMap is V1.2/V1.3 compatible }
  91. { if Type != 0 then ColorMap is V36       compatible }
  92.  
  93. CONST
  94.  COLORMAP_TYPE_V1_2     = $00;
  95.  COLORMAP_TYPE_V1_4     = $01;
  96.  COLORMAP_TYPE_V36      = COLORMAP_TYPE_V1_4;    { use this definition }
  97.  
  98. { Flags variable }
  99.  COLORMAP_TRANSPARENCY   = $01;
  100.  COLORPLANE_TRANSPARENCY = $02;
  101.  BORDER_BLANKING         = $04;
  102.  BORDER_NOTRANSPARENCY   = $08;
  103.  VIDEOCONTROL_BATCH      = $10;
  104.  USER_COPPER_CLIP        = $20;
  105.  
  106.  
  107. CONST
  108.  EXTEND_VSTRUCT = $1000;  { unused bit in Modes field of View }
  109.  
  110.  
  111. { defines used for Modes in IVPargs }
  112.  
  113. CONST
  114.  GENLOCK_VIDEO  =  $0002;
  115.  LACE           =  $0004;
  116.  SUPERHIRES     =  $0020;
  117.  PFBA           =  $0040;
  118.  EXTRA_HALFBRITE=  $0080;
  119.  GENLOCK_AUDIO  =  $0100;
  120.  DUALPF         =  $0400;
  121.  HAM            =  $0800;
  122.  EXTENDED_MODE  =  $1000;
  123.  VP_HIDE        =  $2000;
  124.  SPRITES        =  $4000;
  125.  HIRES          =  $8000;
  126.  
  127.  VPF_A2024      =  $40;
  128.  VPF_AGNUS      =  $20;
  129.  VPF_TENHZ      =  $20;
  130.  
  131.  
  132.  
  133. Procedure FreeColorMap(colormap : ColorMapPtr);
  134.     External;
  135.  
  136. Procedure FreeVPortCopLists(vp : ViewPortPtr);
  137.     External;
  138.  
  139. Function GetColorMap(entries : Integer) : ColorMapPtr;
  140.     External;
  141.  
  142. Function GetRGB4(colomap : ColorMapPtr; entry : Integer) : Integer;
  143.     External;
  144.  
  145. Procedure InitView(view : ViewPtr);
  146.     External;
  147.  
  148. Procedure InitVPort(vp : ViewPortPtr);
  149.     External;
  150.  
  151. Procedure LoadRGB4(vp : ViewPortPtr; colors : Address; count : Short);
  152.     External;
  153.  
  154. Procedure LoadView(view : ViewPtr);
  155.     External;
  156.  
  157. Procedure MakeVPort(view : ViewPtr; viewport : ViewPortPtr);
  158.     External;
  159.  
  160. Procedure MrgCop(view : ViewPtr);
  161.     External;
  162.  
  163. Procedure ScrollVPort(vp : ViewPortPtr);
  164.     External;
  165.  
  166. Procedure SetRGB4(vp : ViewPortPtr; n : Short; r, g, b : Byte);
  167.     External;
  168.  
  169. Procedure SetRGB4CM(cm : ColorMapPtr; n : Short; r, g, b : Byte);
  170.     External;
  171.  
  172. Function VBeamPos : Integer;
  173.     External;
  174.  
  175. Procedure WaitBOVP(vp : ViewPortPtr);
  176.     External;
  177.  
  178. Procedure WaitTOF;
  179.     External;
  180.  
  181.